home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 48
/
Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso
/
-in_the_mag-
/
networking
/
crosspc
/
parpc04
/
packet
/
src
/
printnum.asm
< prev
next >
Wrap
Assembly Source File
|
1993-04-01
|
642b
|
31 lines
;put into the public domain by Russell Nelson, nelson@crynwr.com
public print_number
print_number:
;enter with dx -> dollar terminated name of number, di ->dword.
;exit with the number printed and the cursor advanced to the next line.
mov ah,9 ;print the name of the number.
int 21h
mov al,'0'
call chrout
mov al,'x'
call chrout
mov ax,[di] ;print the number in hex.
mov dx,[di+2]
call dwordout
mov al,' '
call chrout
mov al,'('
call chrout
mov ax,[di] ;print the number in decimal.
mov dx,[di+2]
call decout
mov al,')'
call chrout
mov al,CR
call chrout
mov al,LF
call chrout
ret